<?php

class SliderGallery {

    public static function getSlider($arrayId, $sliderId) {
        $count = count($arrayId );
        echo '<div class="sliderBorder">';
        echo '<div id="slider'.$sliderId.'" class="boximg">';
        echo '<ul id="gallery'.$sliderId.'">';
        $j = 0;
        for ($i = 0; $i < $count; $i++) {
            if ($arrayId[$i] != '') {
                if ($j%5 == 0) { echo '<li>';}
                echo '<a rel="lightbox" href="Image.php?id='.$arrayId[$i].'" ><img src="Image.php?id='.$arrayId[$i].'&tn=true" alt="" /></a>';
                if (($j+1)%5 == 0) { echo '</li>';}
                $j++;
            }
        }
        echo '</ul>';
        echo '</div>';
        echo '</div>';
        return null;
    }

    public static function getSliderEven($arrayId, $sliderId) {
        $count = count($arrayId );
        echo '<div class="sliderBorder">';
        echo '<div id="slider'.$sliderId.'" class="boximg">';
        echo '<ul id="gallery'.$sliderId.'">';
        $j = 0;
        for ($i = 0; $i < $count; $i=$i+2) {
            if ($arrayId[$i] != '') {
                if ($j%5 == 0) { echo '<li>';}
                echo '<a rel="lightbox" href="Image.php?id='.$arrayId[$i].'" ><img src="Image.php?id='.$arrayId[$i].'&tn=true" alt="" /></a>';
                if (($j+1)%5 == 0) { echo '</li>';}
                $j++;
            }
        }
        echo '</ul>';
        echo '</div>';
        echo '</div>';
        return null;
    }

}

?>